/* 移动端适配通用样式 */

/* 断点变量 */
:root {
  --mobile-breakpoint: 768px;
  --small-mobile-breakpoint: 480px;
}

/* 响应式工具类 */

/* 仅在桌面显示 */
@media (max-width: 768px) {
  .desktop-only {
    display: none !important;
  }
}

/* 仅在移动端显示 */
@media (min-width: 769px) {
  .mobile-only {
    display: none !important;
  }
}

/* 响应式容器 */
.container-fluid {
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
  box-sizing: border-box;
}

.container {
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
  box-sizing: border-box;
}

/* 响应式容器在不同断点下的宽度 */
@media (min-width: 576px) {
  .container {
    max-width: 540px;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 720px;
  }
}

@media (min-width: 992px) {
  .container {
    max-width: 960px;
  }
}

@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
}

/* 响应式文本 */
@media (max-width: 768px) {
  .text-center-mobile {
    text-align: center !important;
  }
  
  .text-left-mobile {
    text-align: left !important;
  }
  
  .text-right-mobile {
    text-align: right !important;
  }
}

/* 响应式内边距 */
@media (max-width: 768px) {
  .p-mobile-0 {
    padding: 0 !important;
  }
  
  .p-mobile-1 {
    padding: 0.25rem !important;
  }
  
  .p-mobile-2 {
    padding: 0.5rem !important;
  }
  
  .p-mobile-3 {
    padding: 1rem !important;
  }
  
  .p-mobile-4 {
    padding: 1.5rem !important;
  }
  
  .p-mobile-5 {
    padding: 3rem !important;
  }
  
  .pt-mobile-0 {
    padding-top: 0 !important;
  }
  
  .pb-mobile-0 {
    padding-bottom: 0 !important;
  }
  
  .pl-mobile-0 {
    padding-left: 0 !important;
  }
  
  .pr-mobile-0 {
    padding-right: 0 !important;
  }
}

/* 响应式外边距 */
@media (max-width: 768px) {
  .m-mobile-0 {
    margin: 0 !important;
  }
  
  .m-mobile-1 {
    margin: 0.25rem !important;
  }
  
  .m-mobile-2 {
    margin: 0.5rem !important;
  }
  
  .m-mobile-3 {
    margin: 1rem !important;
  }
  
  .m-mobile-4 {
    margin: 1.5rem !important;
  }
  
  .m-mobile-5 {
    margin: 3rem !important;
  }
  
  .mt-mobile-0 {
    margin-top: 0 !important;
  }
  
  .mb-mobile-0 {
    margin-bottom: 0 !important;
  }
  
  .ml-mobile-0 {
    margin-left: 0 !important;
  }
  
  .mr-mobile-0 {
    margin-right: 0 !important;
  }
}

/* 响应式字体大小 */
@media (max-width: 768px) {
  .fs-mobile-small {
    font-size: 0.875rem !important;
  }
  
  .fs-mobile-medium {
    font-size: 1rem !important;
  }
  
  .fs-mobile-large {
    font-size: 1.25rem !important;
  }
  
  .fs-mobile-xlarge {
    font-size: 1.5rem !important;
  }
}

/* 移动端固定底部导航样式 */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #fff;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  z-index: 1000;
}

.mobile-bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #666;
  text-decoration: none;
}

.mobile-bottom-nav-item.active {
  color: #ffbd00;
}

.mobile-bottom-nav-icon {
  font-size: 20px;
  margin-bottom: 2px;
}

/* 移动端触控友好的按钮尺寸 */
@media (max-width: 768px) {
  .btn {
    padding: 8px 16px;
    font-size: 16px;
    min-height: 44px;
  }
  
  .form-control {
    height: 44px;
    font-size: 16px;
  }
  
  .touch-target {
    min-height: 44px;
    min-width: 44px;
  }
}

/* 滚动条优化 */
@media (max-width: 768px) {
  ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
  }
  
  ::-webkit-scrollbar-track {
    background: transparent;
  }
  
  ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
  }
}

/* Element UI 组件适配 */
@media (max-width: 768px) {
  .el-dialog {
    width: 90% !important;
    margin: 5vh auto !important;
  }
  
  .el-form-item {
    margin-bottom: 15px !important;
  }
  
  .el-tabs__item {
    padding: 0 10px !important;
  }
  
  .el-pagination {
    white-space: normal !important;
    text-align: center !important;
  }
  
  .el-pagination .el-pagination__sizes,
  .el-pagination .el-pagination__jump {
    display: none !important;
  }
}

/* 图片响应式处理 */
img.responsive {
  max-width: 100%;
  height: auto;
} 